package org.hxyjs.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class CosttypeExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public CosttypeExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        protected void addCriterionForJDBCTime(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Time(value.getTime()), property);
        }

        protected void addCriterionForJDBCTime(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Time> timeList = new ArrayList<java.sql.Time>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                timeList.add(new java.sql.Time(iter.next().getTime()));
            }
            addCriterion(condition, timeList, property);
        }

        protected void addCriterionForJDBCTime(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Time(value1.getTime()), new java.sql.Time(value2.getTime()), property);
        }

        public Criteria andConoIsNull() {
            addCriterion("cono is null");
            return (Criteria) this;
        }

        public Criteria andConoIsNotNull() {
            addCriterion("cono is not null");
            return (Criteria) this;
        }

        public Criteria andConoEqualTo(String value) {
            addCriterion("cono =", value, "cono");
            return (Criteria) this;
        }

        public Criteria andConoNotEqualTo(String value) {
            addCriterion("cono <>", value, "cono");
            return (Criteria) this;
        }

        public Criteria andConoGreaterThan(String value) {
            addCriterion("cono >", value, "cono");
            return (Criteria) this;
        }

        public Criteria andConoGreaterThanOrEqualTo(String value) {
            addCriterion("cono >=", value, "cono");
            return (Criteria) this;
        }

        public Criteria andConoLessThan(String value) {
            addCriterion("cono <", value, "cono");
            return (Criteria) this;
        }

        public Criteria andConoLessThanOrEqualTo(String value) {
            addCriterion("cono <=", value, "cono");
            return (Criteria) this;
        }

        public Criteria andConoLike(String value) {
            addCriterion("cono like", value, "cono");
            return (Criteria) this;
        }

        public Criteria andConoNotLike(String value) {
            addCriterion("cono not like", value, "cono");
            return (Criteria) this;
        }

        public Criteria andConoIn(List<String> values) {
            addCriterion("cono in", values, "cono");
            return (Criteria) this;
        }

        public Criteria andConoNotIn(List<String> values) {
            addCriterion("cono not in", values, "cono");
            return (Criteria) this;
        }

        public Criteria andConoBetween(String value1, String value2) {
            addCriterion("cono between", value1, value2, "cono");
            return (Criteria) this;
        }

        public Criteria andConoNotBetween(String value1, String value2) {
            addCriterion("cono not between", value1, value2, "cono");
            return (Criteria) this;
        }

        public Criteria andRnoIsNull() {
            addCriterion("rno is null");
            return (Criteria) this;
        }

        public Criteria andRnoIsNotNull() {
            addCriterion("rno is not null");
            return (Criteria) this;
        }

        public Criteria andRnoEqualTo(String value) {
            addCriterion("rno =", value, "rno");
            return (Criteria) this;
        }

        public Criteria andRnoNotEqualTo(String value) {
            addCriterion("rno <>", value, "rno");
            return (Criteria) this;
        }

        public Criteria andRnoGreaterThan(String value) {
            addCriterion("rno >", value, "rno");
            return (Criteria) this;
        }

        public Criteria andRnoGreaterThanOrEqualTo(String value) {
            addCriterion("rno >=", value, "rno");
            return (Criteria) this;
        }

        public Criteria andRnoLessThan(String value) {
            addCriterion("rno <", value, "rno");
            return (Criteria) this;
        }

        public Criteria andRnoLessThanOrEqualTo(String value) {
            addCriterion("rno <=", value, "rno");
            return (Criteria) this;
        }

        public Criteria andRnoLike(String value) {
            addCriterion("rno like", value, "rno");
            return (Criteria) this;
        }

        public Criteria andRnoNotLike(String value) {
            addCriterion("rno not like", value, "rno");
            return (Criteria) this;
        }

        public Criteria andRnoIn(List<String> values) {
            addCriterion("rno in", values, "rno");
            return (Criteria) this;
        }

        public Criteria andRnoNotIn(List<String> values) {
            addCriterion("rno not in", values, "rno");
            return (Criteria) this;
        }

        public Criteria andRnoBetween(String value1, String value2) {
            addCriterion("rno between", value1, value2, "rno");
            return (Criteria) this;
        }

        public Criteria andRnoNotBetween(String value1, String value2) {
            addCriterion("rno not between", value1, value2, "rno");
            return (Criteria) this;
        }

        public Criteria andConameIsNull() {
            addCriterion("coname is null");
            return (Criteria) this;
        }

        public Criteria andConameIsNotNull() {
            addCriterion("coname is not null");
            return (Criteria) this;
        }

        public Criteria andConameEqualTo(String value) {
            addCriterion("coname =", value, "coname");
            return (Criteria) this;
        }

        public Criteria andConameNotEqualTo(String value) {
            addCriterion("coname <>", value, "coname");
            return (Criteria) this;
        }

        public Criteria andConameGreaterThan(String value) {
            addCriterion("coname >", value, "coname");
            return (Criteria) this;
        }

        public Criteria andConameGreaterThanOrEqualTo(String value) {
            addCriterion("coname >=", value, "coname");
            return (Criteria) this;
        }

        public Criteria andConameLessThan(String value) {
            addCriterion("coname <", value, "coname");
            return (Criteria) this;
        }

        public Criteria andConameLessThanOrEqualTo(String value) {
            addCriterion("coname <=", value, "coname");
            return (Criteria) this;
        }

        public Criteria andConameLike(String value) {
            addCriterion("coname like", value, "coname");
            return (Criteria) this;
        }

        public Criteria andConameNotLike(String value) {
            addCriterion("coname not like", value, "coname");
            return (Criteria) this;
        }

        public Criteria andConameIn(List<String> values) {
            addCriterion("coname in", values, "coname");
            return (Criteria) this;
        }

        public Criteria andConameNotIn(List<String> values) {
            addCriterion("coname not in", values, "coname");
            return (Criteria) this;
        }

        public Criteria andConameBetween(String value1, String value2) {
            addCriterion("coname between", value1, value2, "coname");
            return (Criteria) this;
        }

        public Criteria andConameNotBetween(String value1, String value2) {
            addCriterion("coname not between", value1, value2, "coname");
            return (Criteria) this;
        }

        public Criteria andCosizeIsNull() {
            addCriterion("cosize is null");
            return (Criteria) this;
        }

        public Criteria andCosizeIsNotNull() {
            addCriterion("cosize is not null");
            return (Criteria) this;
        }

        public Criteria andCosizeEqualTo(String value) {
            addCriterion("cosize =", value, "cosize");
            return (Criteria) this;
        }

        public Criteria andCosizeNotEqualTo(String value) {
            addCriterion("cosize <>", value, "cosize");
            return (Criteria) this;
        }

        public Criteria andCosizeGreaterThan(String value) {
            addCriterion("cosize >", value, "cosize");
            return (Criteria) this;
        }

        public Criteria andCosizeGreaterThanOrEqualTo(String value) {
            addCriterion("cosize >=", value, "cosize");
            return (Criteria) this;
        }

        public Criteria andCosizeLessThan(String value) {
            addCriterion("cosize <", value, "cosize");
            return (Criteria) this;
        }

        public Criteria andCosizeLessThanOrEqualTo(String value) {
            addCriterion("cosize <=", value, "cosize");
            return (Criteria) this;
        }

        public Criteria andCosizeLike(String value) {
            addCriterion("cosize like", value, "cosize");
            return (Criteria) this;
        }

        public Criteria andCosizeNotLike(String value) {
            addCriterion("cosize not like", value, "cosize");
            return (Criteria) this;
        }

        public Criteria andCosizeIn(List<String> values) {
            addCriterion("cosize in", values, "cosize");
            return (Criteria) this;
        }

        public Criteria andCosizeNotIn(List<String> values) {
            addCriterion("cosize not in", values, "cosize");
            return (Criteria) this;
        }

        public Criteria andCosizeBetween(String value1, String value2) {
            addCriterion("cosize between", value1, value2, "cosize");
            return (Criteria) this;
        }

        public Criteria andCosizeNotBetween(String value1, String value2) {
            addCriterion("cosize not between", value1, value2, "cosize");
            return (Criteria) this;
        }

        public Criteria andCobegintimeIsNull() {
            addCriterion("cobeginTime is null");
            return (Criteria) this;
        }

        public Criteria andCobegintimeIsNotNull() {
            addCriterion("cobeginTime is not null");
            return (Criteria) this;
        }

        public Criteria andCobegintimeEqualTo(Date value) {
            addCriterionForJDBCTime("cobeginTime =", value, "cobegintime");
            return (Criteria) this;
        }

        public Criteria andCobegintimeNotEqualTo(Date value) {
            addCriterionForJDBCTime("cobeginTime <>", value, "cobegintime");
            return (Criteria) this;
        }

        public Criteria andCobegintimeGreaterThan(Date value) {
            addCriterionForJDBCTime("cobeginTime >", value, "cobegintime");
            return (Criteria) this;
        }

        public Criteria andCobegintimeGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCTime("cobeginTime >=", value, "cobegintime");
            return (Criteria) this;
        }

        public Criteria andCobegintimeLessThan(Date value) {
            addCriterionForJDBCTime("cobeginTime <", value, "cobegintime");
            return (Criteria) this;
        }

        public Criteria andCobegintimeLessThanOrEqualTo(Date value) {
            addCriterionForJDBCTime("cobeginTime <=", value, "cobegintime");
            return (Criteria) this;
        }

        public Criteria andCobegintimeIn(List<Date> values) {
            addCriterionForJDBCTime("cobeginTime in", values, "cobegintime");
            return (Criteria) this;
        }

        public Criteria andCobegintimeNotIn(List<Date> values) {
            addCriterionForJDBCTime("cobeginTime not in", values, "cobegintime");
            return (Criteria) this;
        }

        public Criteria andCobegintimeBetween(Date value1, Date value2) {
            addCriterionForJDBCTime("cobeginTime between", value1, value2, "cobegintime");
            return (Criteria) this;
        }

        public Criteria andCobegintimeNotBetween(Date value1, Date value2) {
            addCriterionForJDBCTime("cobeginTime not between", value1, value2, "cobegintime");
            return (Criteria) this;
        }

        public Criteria andCoendtimeIsNull() {
            addCriterion("coendTime is null");
            return (Criteria) this;
        }

        public Criteria andCoendtimeIsNotNull() {
            addCriterion("coendTime is not null");
            return (Criteria) this;
        }

        public Criteria andCoendtimeEqualTo(Date value) {
            addCriterionForJDBCTime("coendTime =", value, "coendtime");
            return (Criteria) this;
        }

        public Criteria andCoendtimeNotEqualTo(Date value) {
            addCriterionForJDBCTime("coendTime <>", value, "coendtime");
            return (Criteria) this;
        }

        public Criteria andCoendtimeGreaterThan(Date value) {
            addCriterionForJDBCTime("coendTime >", value, "coendtime");
            return (Criteria) this;
        }

        public Criteria andCoendtimeGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCTime("coendTime >=", value, "coendtime");
            return (Criteria) this;
        }

        public Criteria andCoendtimeLessThan(Date value) {
            addCriterionForJDBCTime("coendTime <", value, "coendtime");
            return (Criteria) this;
        }

        public Criteria andCoendtimeLessThanOrEqualTo(Date value) {
            addCriterionForJDBCTime("coendTime <=", value, "coendtime");
            return (Criteria) this;
        }

        public Criteria andCoendtimeIn(List<Date> values) {
            addCriterionForJDBCTime("coendTime in", values, "coendtime");
            return (Criteria) this;
        }

        public Criteria andCoendtimeNotIn(List<Date> values) {
            addCriterionForJDBCTime("coendTime not in", values, "coendtime");
            return (Criteria) this;
        }

        public Criteria andCoendtimeBetween(Date value1, Date value2) {
            addCriterionForJDBCTime("coendTime between", value1, value2, "coendtime");
            return (Criteria) this;
        }

        public Criteria andCoendtimeNotBetween(Date value1, Date value2) {
            addCriterionForJDBCTime("coendTime not between", value1, value2, "coendtime");
            return (Criteria) this;
        }

        public Criteria andCobegindateIsNull() {
            addCriterion("cobeginDate is null");
            return (Criteria) this;
        }

        public Criteria andCobegindateIsNotNull() {
            addCriterion("cobeginDate is not null");
            return (Criteria) this;
        }

        public Criteria andCobegindateEqualTo(Date value) {
            addCriterionForJDBCDate("cobeginDate =", value, "cobegindate");
            return (Criteria) this;
        }

        public Criteria andCobegindateNotEqualTo(Date value) {
            addCriterionForJDBCDate("cobeginDate <>", value, "cobegindate");
            return (Criteria) this;
        }

        public Criteria andCobegindateGreaterThan(Date value) {
            addCriterionForJDBCDate("cobeginDate >", value, "cobegindate");
            return (Criteria) this;
        }

        public Criteria andCobegindateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("cobeginDate >=", value, "cobegindate");
            return (Criteria) this;
        }

        public Criteria andCobegindateLessThan(Date value) {
            addCriterionForJDBCDate("cobeginDate <", value, "cobegindate");
            return (Criteria) this;
        }

        public Criteria andCobegindateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("cobeginDate <=", value, "cobegindate");
            return (Criteria) this;
        }

        public Criteria andCobegindateIn(List<Date> values) {
            addCriterionForJDBCDate("cobeginDate in", values, "cobegindate");
            return (Criteria) this;
        }

        public Criteria andCobegindateNotIn(List<Date> values) {
            addCriterionForJDBCDate("cobeginDate not in", values, "cobegindate");
            return (Criteria) this;
        }

        public Criteria andCobegindateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("cobeginDate between", value1, value2, "cobegindate");
            return (Criteria) this;
        }

        public Criteria andCobegindateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("cobeginDate not between", value1, value2, "cobegindate");
            return (Criteria) this;
        }

        public Criteria andCoenddateIsNull() {
            addCriterion("coendDate is null");
            return (Criteria) this;
        }

        public Criteria andCoenddateIsNotNull() {
            addCriterion("coendDate is not null");
            return (Criteria) this;
        }

        public Criteria andCoenddateEqualTo(Date value) {
            addCriterionForJDBCDate("coendDate =", value, "coenddate");
            return (Criteria) this;
        }

        public Criteria andCoenddateNotEqualTo(Date value) {
            addCriterionForJDBCDate("coendDate <>", value, "coenddate");
            return (Criteria) this;
        }

        public Criteria andCoenddateGreaterThan(Date value) {
            addCriterionForJDBCDate("coendDate >", value, "coenddate");
            return (Criteria) this;
        }

        public Criteria andCoenddateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("coendDate >=", value, "coenddate");
            return (Criteria) this;
        }

        public Criteria andCoenddateLessThan(Date value) {
            addCriterionForJDBCDate("coendDate <", value, "coenddate");
            return (Criteria) this;
        }

        public Criteria andCoenddateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("coendDate <=", value, "coenddate");
            return (Criteria) this;
        }

        public Criteria andCoenddateIn(List<Date> values) {
            addCriterionForJDBCDate("coendDate in", values, "coenddate");
            return (Criteria) this;
        }

        public Criteria andCoenddateNotIn(List<Date> values) {
            addCriterionForJDBCDate("coendDate not in", values, "coenddate");
            return (Criteria) this;
        }

        public Criteria andCoenddateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("coendDate between", value1, value2, "coenddate");
            return (Criteria) this;
        }

        public Criteria andCoenddateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("coendDate not between", value1, value2, "coenddate");
            return (Criteria) this;
        }

        public Criteria andCodescIsNull() {
            addCriterion("codesc is null");
            return (Criteria) this;
        }

        public Criteria andCodescIsNotNull() {
            addCriterion("codesc is not null");
            return (Criteria) this;
        }

        public Criteria andCodescEqualTo(String value) {
            addCriterion("codesc =", value, "codesc");
            return (Criteria) this;
        }

        public Criteria andCodescNotEqualTo(String value) {
            addCriterion("codesc <>", value, "codesc");
            return (Criteria) this;
        }

        public Criteria andCodescGreaterThan(String value) {
            addCriterion("codesc >", value, "codesc");
            return (Criteria) this;
        }

        public Criteria andCodescGreaterThanOrEqualTo(String value) {
            addCriterion("codesc >=", value, "codesc");
            return (Criteria) this;
        }

        public Criteria andCodescLessThan(String value) {
            addCriterion("codesc <", value, "codesc");
            return (Criteria) this;
        }

        public Criteria andCodescLessThanOrEqualTo(String value) {
            addCriterion("codesc <=", value, "codesc");
            return (Criteria) this;
        }

        public Criteria andCodescLike(String value) {
            addCriterion("codesc like", value, "codesc");
            return (Criteria) this;
        }

        public Criteria andCodescNotLike(String value) {
            addCriterion("codesc not like", value, "codesc");
            return (Criteria) this;
        }

        public Criteria andCodescIn(List<String> values) {
            addCriterion("codesc in", values, "codesc");
            return (Criteria) this;
        }

        public Criteria andCodescNotIn(List<String> values) {
            addCriterion("codesc not in", values, "codesc");
            return (Criteria) this;
        }

        public Criteria andCodescBetween(String value1, String value2) {
            addCriterion("codesc between", value1, value2, "codesc");
            return (Criteria) this;
        }

        public Criteria andCodescNotBetween(String value1, String value2) {
            addCriterion("codesc not between", value1, value2, "codesc");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}